package top.rish.rib.base.ware;

import lombok.Data;
import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.annotation.entity.Column;
import org.beetl.sql.annotation.entity.Version;

import java.time.LocalDateTime;

@Data
public class BaseEntity implements DesireEntity {

    @AssignID("uuid22")
    private String id;

    @Column("parent_id")
    private String parentId;

    @Column("created_at")
    private LocalDateTime createdAt;

    @Column("updated_at")
    @Version
    private LocalDateTime updatedAt;

    @Column("deleted_at")
    private LocalDateTime deletedAt;

    @Column("created_by")
    @Dict(table="user",key="id",label="real_name")
    private String createdBy;

    @Column("updated_by")
    @Dict(table="user",key="id",label="real_name")
    private String updatedBy;

    @Column("deleted_by")
    @Dict(table="user",key="id",label="real_name")
    private String deletedBy;

    @Column("deleted")
    @Dict(dict = "base_entity_deleted")
    private Long deleted;

    @Column("status")
    @Dict(dict = "base_entity_status")
    private Long status;

    @Column("sort")
    private Long sort;

    @Column("remark")
    private String remark;

}
